{{extend "selfdevpoll_layout.html"}}

{{block page_header}}
    <ul class="breadcrumb">
      <li><a href="/poll/selfdev">投票首页</a> <span class="divider">/</span></li>
      <li class="active">投票明细查看</li>
    </ul>
    <form class="form" action="/poll/selfdev/details">
        <div class="clearfix">
            <label for="name_email">查找姓名或邮箱</label>
            <div class="input">
              <input class="xlarge" id="name_email" name="name" size="30" type="text" value="{{=name}}"></input>
              <input class="btn primary" type="submit" value="查询"></input>
            </div>
        </div>
    </form>
{{end}}

{{block content_main_container}}
<style>
span.enabled_flag {font-size:170%;font-weight:bold;}
</style>
{{use "bootstrap", plugins=['pagination']}}
<div class="main">
{{<< table}}
</div>
<div id="pagination"></div>

<script>
        
var create_pagination = function (el, total, page_nums, start, callback){
    if (total){
        $(el).paginator({
            total:      total,
            start:      start,
            page_rows:       page_nums,
            next:       '{{=_('Next')}}', 
            prev:       '{{=_('Prev')}}', 
            onchange:   callback
        });
    }
}
function callback(page){
    window.location.href = '/poll/selfdev/details?page='+page;
}

$('#pagination').paginator(
    {
        total: {{=total}},
        start: {{=pageno}},
        page_rows: {{=page_rows}},
        onchange: callback
    }
);
</script>
{{end}}
